#pragma once

#include "serialise/serialise.h"
#include "serialise/serialisetypes.h"
#include "serialise/reference.h"
#include "serialise/database.h"
#include "serialise/jsonserialise.h"

namespace Test2
{

struct TestSchema;

}

namespace Serialisation
{
}

namespace Test2
{

struct TestSchema
{
	std::vector<int> m_testArray;
	std::string m_testString;

	SERIALISATION_DECL_GUID(Test2::TestSchema)
};

template <typename Archive>
void Serialise(Archive& ar, TestSchema& t)
{
	ar.Serialise("TestArray", t.m_testArray);
	ar.Serialise("TestString", t.m_testString);
}

inline void FindReferences(const Json::Database& database, TestSchema& t)
{
}

inline void RegisterTypes(Json::Database& database)
{
	static bool done = false;
	if (!done)
	{
		SERIALISATION_REGISTER(Json::Serialiser, TestSchema)
		done = true;
	}

	DATABASE_REGISTER(database, TestSchema)
}

}
